package com.aloha.springframework.beans.factory.support;

import com.aloha.springframework.beans.BeansException;
import com.aloha.springframework.core.io.Resource;
import com.aloha.springframework.core.io.ResourceLoader;

/**
 * @author DaiZhiHeng
 * @description 用于读取Bean定义信息
 * @date 2023/6/27 20:43
 */
public interface BeanDefinitionReader {

    /**
     * 获取Bean定义信息的注册中心
     */
    BeanDefinitionRegistry getRegistry();

    /**
     * 获取资源加载器
     */
    ResourceLoader getResourceLoader();

    /**
     * 通过资源对象加载Bean定义信息
     */
    void loadBeanDefinitions(Resource resource) throws BeansException;

    void loadBeanDefinitions(Resource... resources) throws BeansException;

    void loadBeanDefinitions(String location) throws BeansException;

    void loadBeanDefinitions(String... locations) throws BeansException;


}
